package cn.gzmli.dtt.common.service;


import cn.gzmli.dtt.common.dao.CodeInfoDao;
import cn.gzmli.dtt.common.entity.Codeinfo;
import cn.gzmli.dtt.common.entity.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: yangxiong
 * @Date: 2018/7/13 16:17
 * @Description:
 */
@Service
public class CodeInfoService {

    @Autowired
    CodeInfoDao codeInfoDao;

    public List list(Codeinfo codeinfo, PageInfo pageInfo) throws Exception {
        return codeInfoDao.list(codeinfo,pageInfo);
    }

    public int save(Codeinfo codeinfo){
        return codeInfoDao.save(codeinfo);
    }

    public int update(Codeinfo codeinfo){
        return codeInfoDao.updateBean(codeinfo);
    }

    public int delete(Codeinfo codeinfo){
        return codeInfoDao.delete(codeinfo.getCodeInfoId());
    }


}
